package com.itheima.xmy.Demo;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

/*请编写程序，定义一个Properties对象，存储以下内容：


请将上述内容写入到文件`iphone.properties`中（自己选定文件存储的位置）。*/
public class Properties01 {
    public static void main(String[] args) throws IOException {

        Properties pro = new Properties();
        pro.setProperty("brand", "Iphone11Pro Max");
        pro.setProperty("capacity", "256G");
        pro.setProperty("price", "10899");

        pro.store(new BufferedWriter(new FileWriter("day-11/src/iphone.properties")), "~~");
    }
}
